-- ==== BEGIN LICENSE BLOCK ====
-- storyboard-addon - Copyright (C) Arnaud Charnoz, 2006-2010.
-- Distributed under the terms of the GNU Lesser General Public License (LGPL) as
-- published by the Free Software Foundation.
-- ===== END LICENSE BLOCK ====
 
Object = {};
 
Object.__index = Object;
 
function Object:new()
    
    local self = {};
    setmetatable(self, Object);
     
    self.key  = "Médaillon";
    self.name = "Médaillon gnomique";
    self.icon = "Interface\\Icons\\INV_Misc_Gear_04.blp";
    self.info = "Médaillon rond sur lequel est grave un rouage cranté."
     
    return self;
end


-- [ Setters & Getters ] --

-------------------------------------------------------------------------------

function Object:setKey( newKey )
     self.key = newKey;
end

-------------------------------------------------------------------------------

function Object:getKey()
     return self.key;
end

-------------------------------------------------------------------------------

function Object:setName( newName )
     self.name = newName;
end

-------------------------------------------------------------------------------

function Object:getName()
     return self.name;
end

-------------------------------------------------------------------------------

function Object:setInfo( newInfo )
     self.info = newInfo;
end

-------------------------------------------------------------------------------

function Object:getInfo()
     return self.info;
end

-------------------------------------------------------------------------------

function Object:setIcon( newIcon )
     self.icon = newIcon;
end

-------------------------------------------------------------------------------

function Object:getIcon()
     return self.icon;
end

-------------------------------------------------------------------------------

function Object:exportToTable()
    
    local dataTable = {} ;
    
    table.insert( dataTable , self.key );
    table.insert( dataTable , self.name );
    table.insert( dataTable , self.icon );
    table.insert( dataTable , self.info );

    return dataTable;
     
end

-------------------------------------------------------------------------------

function Object:importFromTable( dataTable )
    
    self.key = dataTable[1];
    self.name = dataTable[2];
    self.icon = dataTable[3];
    self.info = dataTable[4];
   
end

-------------------------------------------------------------------------------